<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title>新闻详情_${webnews.title}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <#meta name="Keywords" content="${keywords}"/>
    <#meta name="Description" content="${description}"/>
    <link type="text/css"  rel="stylesheet"  href="/static/css/base.css" />
    <link type="text/css"  rel="stylesheet"  href="/static/css/screen.css" />
    <link type="text/css"  rel="stylesheet"  href="/static/css/news.css" />
    <link type="text/css"  rel="stylesheet"  href="/static/css/weixin.css" />
    <script src="/static/js/jquery-1.8.0.min.js"></script>
    <script src="/static/js/common.js"></script>
    <script typet="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script type="text/javascript">

        $(function(){
            var url = location.href.split('#').toString();//url不能写死
            $.ajax({
                type : "get",
                url : "/wx/getWxConfig",
                dataType : "json",
                async : false,
                data:{url:url},
                success : function(data) {
                    wx.config({
                        debug: false,////生产环境需要关闭debug模式
                        appId: data.appId,//appId通过微信服务号后台查看
                        timestamp: data.timestamp,//生成签名的时间戳
                        nonceStr: data.nonceStr,//生成签名的随机字符串
                        signature: data.signature,//签名
                        jsApiList: [//需要调用的JS接口列表
                            'checkJsApi',//判断当前客户端版本是否支持指定JS接口
                            'onMenuShareTimeline',//分享给好友
                            'onMenuShareAppMessage'//分享到朋友圈
                        ]
                    });
                },
                error: function(xhr, status, error) {
                    //alert(status);
                    //alert(xhr.responseText);
                }
            })
        });

        wx.ready(function () {
            var link = window.location.href;
            var protocol = window.location.protocol;
            var host = window.location.host;
            //分享朋友圈
            wx.onMenuShareTimeline({
                title: '${webnews.title}',
                link: link,
                imgUrl: protocol+'//'+host+'/static/images/weixin/wap_logo.jpg',// 自定义图标
                trigger: function (res) {
                    // 不要尝试在trigger中使用ajax异步请求修改本次分享的内容，因为客户端分享操作是一个同步操作，这时候使用ajax的回包会还没有返回.
                    //alert('click shared');
                },
                success: function (res) {
                    alert('分享成功！');
                    //some thing you should do
                },
                cancel: function (res) {
                    //alert('shared cancle');
                },
                fail: function (res) {
                    //alert(JSON.stringify(res));
                }
            });
            //分享给好友
            wx.onMenuShareAppMessage({
                title: '${webnews.title}', // 分享标题
                desc: '${webnews.description}', // 分享描述
                link: link, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
                imgUrl: protocol+'//'+host+'/static/images/weixin/wap_logo.jpg', // 自定义图标
                type: 'link', // 分享类型,music、video或link，不填默认为link
                dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
                success: function () {
                    // 用户确认分享后执行的回调函数
                    alert('分享成功！');
                },
                cancel: function () {
                    // 用户取消分享后执行的回调函数
                }
            });
            wx.error(function (res) {
                alert(res.errMsg);
            });
        });

    </script>

    <style>
      .icon{
        display: none;
      }
    </style>
  </head>
<body>
<div  class="icon" >
  <img src="/static/images/weixin/wap_logo.jpg" alt=""/>
</div>
<!--top start -->
<!--top over --> 

<!--main start -->

<div class="container">

  <div class="newsdetail">
    <div class="detailLeft">
      <div class="detailTitle">
        <h1>
          @if(isAnounce == 0){
          ${webnews.title}
          @}
        </h1>
      </div>
      <div class="detailLeftBox">
        @if(isVedio == 0){
          <p>${webnews.content}</p>
        @}
        @if(isVedio == 1){
          <center> <embed src='${webnews.content}' allowFullScreen='true' quality='high' width='720' height='600' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash'></embed></center>
          <center><p>${webnews.description}</p></center>
        @}
      </div>
    </div>
    <div class="pageover"><span>END</span></div>
  </div>
</div>

<!--main over --> 

<!--footer start -->
<div class="fixBtn">
  <ul>
    <li><a></a>
      <div class="sharebox" >
        <div class="bdsharebuttonbox"><a href_="#" class="bds_more" style="display:none" data-cmd="more"></a><a href_="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a><a href_="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href_="#" class="bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a></div>
      </div>
    </li>
    <li><a href="http://cn.mikecrm.com/Y7ZSMTX" target="_blank"><span>意见反馈</span></a></li>
    <li ><a id="stop"><span>返回顶部</span></a></li>
  </ul>
</div>
<div class="wxBtoomCode">
  <div class="wxBCLeft"> <span><img src="/static/images/code2.png"/></span> </div>
  <div class="wxBCRight">
    <dl>
      <dt><a href="#">文章</a><a href="#">交流</a><a href="#">资讯</a></dt>
      <dd>长按关注本协会公众号！</dd>
    </dl>
  </div>
</div>
<div class="footerLine"> </div>
<div class="wxFooter">
  <p> 厦门市湖里区枋钟路2368号<br/>
    金山财富广场4号楼105室<br/>
    0592-6031253</p>
  <p><span>&nbsp;</span></p>
  <p> www.fpmsa.org.cn </p>
</div>
<script src="/static/js/base.js"></script>
</body>
</html>
